$OpenBSD: patch-CPP_7zip_Archive_7z_7zIn_cpp,v 1.1 2016/11/21 21:49:25 juanfra Exp $

For CVE-2016-9296, from 7zip's developer Igor Pavlov  

--- CPP/7zip/Archive/7z/7zIn.cpp.orig	Sun Nov 20 09:29:41 2016
+++ CPP/7zip/Archive/7z/7zIn.cpp	Sun Nov 20 09:31:22 2016
@@ -1097,7 +1097,8 @@ HRESULT CInArchive::ReadAndDecodePackedStreams(
       if (CrcCalc(data, unpackSize) != folders.FolderCRCs.Vals[i])
         ThrowIncorrect();
   }
-  HeadersSize += folders.PackPositions[folders.NumPackStreams];
+  if (folders.PackPositions)
+      HeadersSize += folders.PackPositions[folders.NumPackStreams];
   return S_OK;
 }
 
